package org.tacademy.myframetab;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MyFrameTabActivity extends Activity {

	TextView text01;
	TextView text02;
	TextView text03;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        text01 = (TextView)findViewById(R.id.text01);
        text02 = (TextView)findViewById(R.id.text02);
        text03 = (TextView)findViewById(R.id.text03);
        
        Button button01 = (Button)findViewById(R.id.button01);
        button01.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				text01.setVisibility(View.VISIBLE);
				text02.setVisibility(View.INVISIBLE);
				text03.setVisibility(View.INVISIBLE);
			}
		});
        
        Button button02 = (Button)findViewById(R.id.button02);
        button02.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				text01.setVisibility(View.INVISIBLE);
				text02.setVisibility(View.VISIBLE);
				text03.setVisibility(View.INVISIBLE);
			}
		});
        
        Button button03 = (Button)findViewById(R.id.button03);
        button03.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				text01.setVisibility(View.INVISIBLE);
				text02.setVisibility(View.INVISIBLE);
				text03.setVisibility(View.VISIBLE);
			}
		});
    }
}